<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMerchantStaffTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchant_staff', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')      ->default(0)    ->comment('用户id');
            $table->string('phone')         ->default('')   ->comment('用户手机号');
            $table->integer('merchant_id')  ->default(0)    ->comment('商户id');
            $table->integer('role_id')      ->default(0)    ->comment('角色id');
            $table->string('remark')        ->default(0)    ->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('merchant_staff');
    }
}
